package com.desheng.bigdata.flink.batch.source

import org.apache.flink.api.scala._
/**
  * 从集合中读取数据
  */
object _02SourceFromCollection {
    def main(args: Array[String]): Unit = {
        val env = ExecutionEnvironment.getExecutionEnvironment
        val list = List(
            "hello you",
            "i love you",
            "do you love he"
        )
        var dataset = env.fromElements(list: _*)

        dataset = env.fromCollection(list)

        dataset.print()
    }
}
